<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-dayManage-edit" th:object="${dayManage}">
        <input id="dayId" name="dayId" th:field="*{dayId}" type="hidden">
        <div class="col-md-6 form-group">
            <label class="col-sm-3 control-label">日程类型：</label>
            <div class="col-sm-8">
                <select name="dayType" class="form-control m-b" th:with="type=${@dict.getType('oa_daymanage_type')}" readonly>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{dayType}"></option>
                </select>
            </div>
        </div>
        <div class="col-md-6 form-group">
            <label class="col-sm-3 control-label">日程状态：</label>
            <div class="col-sm-8">
                <select name="status" class="form-control m-b" th:with="type=${@dict.getType('oa_daymanage_status')}" readonly>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
                </select>
            </div>
        </div>
        <div class="col-md-6 form-group">
            <label class="col-sm-3 control-label">开始时间：</label>
            <div class="col-sm-8">
                <input id="startTime" name="startTime" th:value="${#dates.format(dayManage.startTime,'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="col-md-6 form-group">
            <label class="col-sm-3 control-label">结束时间：</label>
            <div class="col-sm-8">
                <input id="endTime" name="endTime"  th:value="${#dates.format(dayManage.endTime,'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="col-md-6 form-group">
            <label class="col-sm-3 control-label">日程标题：</label>
            <div class="col-sm-8">
                <input id="dayTitle" name="dayTitle" th:field="*{dayTitle}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="col-md-6 form-group">
            <label class="col-sm-3 control-label">是否提醒：</label>
            <div class="col-sm-8">
                <div class="radio-box" th:each="dict : ${@dict.getType('sys_yes_no')}">
                    <input type="radio" th:id="${dict.dictCode}" name="remind" th:value="${dict.dictValue}" th:field="*{remind}">
                    <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
            </div>
        </div>
        <div class="col-md-6 form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea id="remark" name="remark" class="form-control" readonly>[[*{remark}]]</textarea>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "oa/daymanage"
    $("#form-dayManage-edit").validate({
        rules: {
            dayTitle: {
                required: true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-dayManage-edit').serialize());
        }
    }
</script>
</body>
</html>